<template>
	<view class="orderDetail" :style="{paddingBottom: isShowAll || isShowSel?'100rpx':'0px'}">
		<view v-if="isShowAll">
			
		<view class="for-payment" v-if="datalist.status==10">待付款</view>
		<view class="for-payment" v-if="datalist.status==20">待确认</view>
		<view class="for-payment" v-if="datalist.status==33">待付尾款</view>
		<view class="for-payment" v-if="datalist.status==50">待自提</view>
		<view class="for-payment" v-if="datalist.status==40">待发货</view>
		<view class="for-payment" v-if="datalist.status==60">待收货</view>
		<view class="for-payment" v-if="datalist.status=== 80 && datalist.isComment === 0 ">待评价</view>
		<view class="for-payment" v-if="datalist.status===80 && datalist.isComment === 1 ">已评价</view>
		<view class="for-payment" v-if="datalist.status==70">已退款</view>
		<view class="for-payment" v-if="datalist.status==0">已取消</view>
		<view class="address" v-if="datalist.deliveryType ===10 ">
			<!-- 快递 -->
			<view class="left">
				<view class="address-detail">
					<image src="/static/image/定位@2x.png" mode="">
					</image>{{datalist.address.region.province+','+datalist.address.region.city+',' +
					 datalist.address.region.region}}
				</view>
				<view class="name">
					<span class='green1'>{{datalist.address.name}}</span>
					<span>{{datalist.address.phone}}</span>
				</view>
			</view>
			<view class="right">{{datalist.deliveryType ==20 ?'自提' :'快递'}}</view>
		</view>
		<view class="address" v-else>
			<view class="left">
				<view class="address-detail">
					<image src="/static/image/定位@2x.png" mode="">
					</image>
					<text v-if="datalist.extractStore">
						{{datalist.extractStore.storeName}}
					</text>
				</view>
				<view class="name">
					<span class='green1'>{{datalist.extractName}}</span>
					<span>{{datalist.extractPhone}}</span>
				</view>
			</view>
			<view class="right">{{datalist.deliveryType ==20 ?'自提' :'快递'}}</view>
		</view>
		<view class="buyer-message">
			<view class='buyer'>买家留言</view>
			<view class="message">{{datalist.buyerRemark=='' ? '无' :datalist.buyerRemark}}</view>
		</view>
		<view class="item-content">
			<view class="item">
				<view class="buyers">
					<view class="buyers-bigBox">
						<view class="buyers-box">
							<view class="buyers-left">
								<span class='store-name'
									style="font-size: 28rpx;color: #077840;font-weight: bold;">订单商品</span>
							</view>
							<!-- fix 修改订单按钮 -->
							<view class="">
								<!-- datalist.isAudit != 1 && (datalist.status==20 || datalist.status==10) -->
								<uni-icons v-if="datalist.canModify"  type="compose"
									style="color: #077840;margin-right: 3px;vertical-align: top;" size="26"
									@click="toggle('bottom')"></uni-icons>
									<span @click="toggle('bottom')" v-if="datalist.canModify"  style="color: #077840">修改</span>
								
							</view>

						</view>
						<view class="goods-detail">
							<view class="goods" v-for="(item1,index1) in datalist.productList" :key="index1">
								<view class="goods-newly">
									<view>
										<view class="goods-newly_icon">
											{{item1.isGift == 1?'赠品':datalist.orderSourceText }}
										</view>
									</view>
									<view>


										<view v-if="datalist.status==50" class="goods-sta sta1">
											<uni-tag text="待自提" size="mini" type="warning" />
										</view>
										<view v-if="datalist.status==40" class="goods-sta sta1">

											<uni-tag text="待发货" size="mini" type="warning" />
										</view>
									</view>
								</view>
								<view class="goods-top">
									<view class="goods-img">
										<image :src="item1.imagePath" mode=""></image>
									</view>
									<view class="goods-detail-text">
										<view class="goods">
											<span> {{item1.productName}}</span>
											<span>￥{{item1.productPrice}}</span>
										</view>
										<view class="goods-species">
											<span>{{item1.productAttr}}</span>
											<span>x{{item1.totalNum}}</span>
										</view>
									</view>
								</view>
								<view class="packing" v-if="item1.isGift == 0">
									<view class="packing_right">
										<text>定金¥{{item1.depositPrice}}</text>
										<text>尾款¥{{item1.finalPrice}}</text>
										<text>总价¥{{item1.totalPrice}}</text>
									</view>
								</view>
								<view class="packing packing_right">
									<text>商品类型: {{item1.orderProductType == '10'?'销售':item1.orderProductType == '20'?'赠品':item1.orderProductType == '30'?'赔付':''}} </text>
								</view>
								<view class="packing packing_right">
									<text>商品编码: {{item1.productNo}} </text>
								</view>
								

								<!-- 自提  自提订单20且订单状态为待确认20-->

								<!-- 	<view class="time1" @click.stop="timeSelect(item1,datalist)"
									v-if="datalist.deliveryType ===20">
									{{ (item1.expectDeliveryTime === '' || item1.expectDeliveryTime === null ) 
									? '请选择自提时间': formaterTime(item1.expectDeliveryTime)}}
								</view> -->

								<!-- 确认后显示快递的时间 -->
								<!-- 	<view class="time1" v-if="datalist.deliveryType ===10"
									@click.stop="timeSelect(item1,datalist)">
									{{ (item1.expectDeliveryTime === '' || item1.expectDeliveryTime === null )
										? '请选择发货时间': formaterTime(item1.expectDeliveryTime)}}
								</view> -->
								<template v-if="item1.isGift == 0">
									<view class="time1" v-if="datalist.deliveryType==20 && !item1.expectDeliveryTime "
										@click.self.stop="setProdcutTime(item,item1)"> 选择时间</view>
									<!-- 时间选择以后start  -->
									<view class="time1" v-if="item1.expectDeliveryTime && datalist.deliveryType === 20">
										确定在{{ formaterTime(item1.expectDeliveryTime) }}可自提
									</view>
									<view class="time1" v-if="item1.expectDeliveryTime && datalist.deliveryType === 10">
										确定在{{ formaterTime(item1.expectDeliveryTime) }}可发货
									</view>
									<!-- 时间选择以后 end -->

									<view class="time1">
										{{item1.productAddress}}
									</view>
								</template>
								<br />
							</view>

						</view>
						<span style="font-size: 28rpx;color: #077840;font-weight: bold;">商品总计：</span>
						<view class="order-number">
							<span>定 金：</span>
							<span class='number'>¥{{datalist.depositPrice}}</span>
						</view>
						<view class="order-number">
							<span>尾 款：</span>
							<span class='number'>¥{{datalist.finalPrice}}</span>
						</view>
						<view class="order-number">
							<span>包装费：</span>
							<span class='number'>¥{{datalist.packPrice}}</span>
						</view>
						<view class="order-number">
							<span>实付金额：</span>
							<span class='number'>¥{{datalist.orderPrice}}</span>

						</view>
						<span style="font-size: 28rpx;color: #077840;font-weight: bold;">订单信息：</span>
						<view class="order-number">
							<span>订单编号：</span>
							<span class='number'>{{datalist.orderNo}}</span>
						</view>
						<view class="order-number">
							<span>下单时间：</span>
							<span class='number'>{{datalist.createTime }}</span>
						</view>
						<view class="order-time">
							<span>下单时间：</span>
							<span class='time'>{{!item.yonyouCode?'单据未同步':item.yonyouCode}}</span>
						</view>
					</view>
				</view>
			</view>
		</view>
		<uni-section style="margin: 15px;margin-bottom: 0px;padding-bottom: 1px;" title="订单记录" type="line">
			<view class="uni-padding-wrap uni-common-mt">
				<uni-segmented-control :current="current" :values="items" style-type="text" active-color="#077840"
					@clickItem="onClickItem" />
			</view>
			<view class="content">
				<!-- 付款记录 -->
				<view v-if="current == 0">
					<view v-for="(Bill,index) in datalist.orderBillList" class="uni-collapse-content"
						v-if="datalist.orderBillList && datalist.orderBillList.length">
						<uni-card>
							<view class="card-box">
								<text class="slot-text card-box-text">订单ID：{{Bill.orderId}}</text>
								<text class="slot-text card-box-text">账单号：{{Bill.billNo}}</text>
								<text class="slot-text card-box-text">付款凭证： <img @click="previewImage(Bill.payFilePath)" v-if="Bill.payFilePath"
										:src="Bill.payFilePath"
										style="width: 200rpx;vertical-align: middle;" /></text>
								<text
									class="slot-text card-box-text">确认状态：{{ Bill.status == 10 ? '未确认' : Bill.status == 30 ? '已确认' : Bill.status == 20 ? '审批中' : ''}}
								</text>
								<text class="slot-text card-box-text">确认时间：{{Bill.confirmTime}}</text>
								<text class="slot-text card-box-text">账单金额：￥{{Bill.billAmount || '0.00'}}</text>
								<text
									class="slot-text card-box-text">类型：{{Bill.billType == 1 ? '定金' : Bill.billType == 2 ? '补交定金' : '尾款' }}
								</text>
								<text
									class="slot-text card-box-text">支付方式：{{ Bill.payType == 10 ? '余额支付' : Bill.payType == 20 ? '微信支付' : Bill.payType == 30? '支付宝支付' : Bill.payType == 40 ? '线下支付' : Bill.payType == 50 ? '余额微信组合支付':''}}
								</text>
								<text
									class="slot-text card-box-text">支付状态：{{ Bill.payStatus == 10 ? '待付款' : Bill.payStatus == 20 ? '已付款' : Bill.payStatus == 30 ?'支付中':''}}
								</text>
								<text class="slot-text card-box-text">支付时间：{{Bill.payTime}}</text>
								<text class="slot-text card-box-text">账单备注：{{Bill.billRemark}}</text>
								<view class="slot-text card-box-text">
									<button type="primary" style="width: 100%;" size="mini"  @click="wkchooseImage(Bill)" v-if="Bill.status == 10 && Bill.payType == 40">上传凭证</button>
								</view>
							</view>
						</uni-card>

					</view>
					<view v-else style="height: 100px;overflow-y: auto;text-align: center;">
						暂无数据...
					</view>
				</view>
				<!-- 发货记录 -->
				<view v-if="current == 1">
					<view class="uni-collapse-content" v-for="(val,index) in datalist.deliveryList"
						v-if="datalist.deliveryList && datalist.deliveryList.length">
						<uni-card>
							<div class="card-box" :key="index">
								<!-- <view class="card-box slot-box" @click="goFHDetails(val)"> -->
								<text class="slot-text card-box-text">发货单号：{{val.deliveryNo}}</text>
								<text class="slot-text card-box-text">发货时间：{{val.deliveryTime}}</text>
								<text class="slot-text card-box-text">发货总数量：{{val.deliveryCount}}</text>
								<text class="slot-text card-box-text">发货总金额：￥{{val.deliveryAmount || '0.00'}}</text>
								<text class="slot-text card-box-text">发货人：{{val.deliveryName}}</text>
								<text class="slot-text card-box-text">发货状态：{{val.status == 10 ? '审核中' : val.status == 20 ? '待付款' : val.status == 30 ? '付款审批' : val.status == 40 ? '待提货' : val.status == 50 ? '已提货' : val.status == 60 ? '审批拒绝' : val.status == 70 ? '已取消' : ""}}</text>
								<!-- </view> -->
							</div>
						</uni-card>

					</view>
					<view v-else style="height: 100px;overflow-y: auto;text-align: center;">
						暂无数据...
					</view>
				</view>
				<!-- 退款记录 -->
				<view v-if="current == 2">
					<view class="uni-collapse-content" v-if="datalist.refundList && datalist.refundList.length"
						v-for="(Bill,index) in datalist.refundList">
						<uni-card>
							<view class="card-box">
								<text class="slot-text card-box-text">退款单号：{{Bill.refundNo}}</text>
								<text class="slot-text card-box-text">退款类型：{{Bill.source == 10 ? '用户发起' : Bill.source == 20 ? '业务员发起' : Bill.source == 30 ? '财务发起':'' }}</text>
								<text class="slot-text card-box-text">退款人：{{Bill.applyName}}</text>
								<text class="slot-text card-box-text">退款时间：{{Bill.createTime}}</text>
								<text class="slot-text card-box-text">退款原因：{{Bill.applyDesc}}</text>
								<text class="slot-text card-box-text">退款金额：￥{{Bill.refundMoney || '0.00'}}</text>
								<text class="slot-text card-box-text">申请退款金额：￥{{Bill.applyPrice || '0.00'}}</text>
								<text class="slot-text card-box-text">退款方式：{{Bill.backType == 10 ? '原路退回' : Bill.backType == 20 ? '余额退回' :'' }}</text>
								<text class="slot-text card-box-text">退款状态：{{Bill.statusText}}</text>
								<!-- <text class="slot-text card-box-text">付款凭证： <img :src="Bill.payFilePath"
										style="width: 100rpx;height: 100rpx;vertical-align: middle;" /></text> -->
							</view>
						</uni-card>
					</view>
					<view v-else style="height: 100px;overflow-y: auto;text-align: center;">
						暂无数据...
					</view>
				</view>
			</view>
		</uni-section>
		<view class="order-btn" :style="isIphone?'padding-bottom: 68rpx;':''">

			<view class="common">
				<!-- <view class="confirm-btn btn two" v-if="datalist.status === 30 
				&& datalist.finalPayType === 40  && !refOptions.includes(item.refundStatus)"
					@click.stop="confirmPayment(datalist)">确认尾款
				</view> -->
				
				<!-- <view v-if="datalist.status === 20 && !refOptions.includes(item.refundStatus) "
					class="confirm-btn btn two" @click="confirmOrder(datalist)">
					确认订单
				</view> -->
				<view class="confirm-btn btn two" v-if="datalist.status === 40 
					 && !refOptions.includes(item.refundStatus)" @click.stop="gotoClick(datalist)">
					<uni-icons type="paperplane" style="color:#077840;vertical-align: middle;" size="22"></uni-icons>去发货
				</view>
			</view>
			<!-- 	<view class="confirm-btn btn " v-if="datalist.status==5 || datalist.status==4 "
					:class="[datalist.Eve=='已全部发货'||datalist.Eve=='已全部自提'?'quanbu':'confirm-btn btn two']"
					@click="reissue(datalist)">{{datalist.Eve}}</view>
				<view class="confirm-btn btn two" v-if="datalist.status==8" @click="checkEvaluation(datalist)">查看评价
				</view>
				<view v-if="datalist.status==10 && datalist.is_back!=3 && datalist.is_back!=2"
					class="refund-btn btn two" @click="reject(datalist)">拒绝</view>
				<view v-if="datalist.status==10 && datalist.is_back!=3 && datalist.is_back!=2"
					class="confirm-btn btn two" @click="aggree(datalist)">同意</view>
					</view> -->
					<!-- 关闭订单 -->
				<!-- 	<uni-icons v-if="datalist.orderStatusText != '已取消' || datalist.orderStatusText != '已退款' || datalist.orderStatusText != '退款中' || datalist.orderStatusText != '已完成' || datalist.orderStatusText != '审核中'" type="close"
						style="color: red;margin-right: 3px;vertical-align: top;" size="26"
						@click="closeOrder()"></uni-icons> -->
			<span class="confirm-btn btn two" @click="closeOrder()" v-if="datalist.orderStatusText != '已取消' || datalist.orderStatusText != '已退款' || datalist.orderStatusText != '退款中' || datalist.orderStatusText != '已完成' || datalist.orderStatusText != '审核中'" style="color: red;border: 1px solid red;">关闭订单</span>
		</view>
		<!-- 	<view class="bottom" style="width: 100%; height: 96rpx;">
		</view> -->
		<uni-calendar ref="calendar" class="uni-calendar--hook" :selected="info.selected" :date="info.data"
			:insert="info.insert" :lunar="info.lunar" :startDate="info.startDate" :range="info.range" @confirm="confirm"
			@close="close" />
		<w-picker :visible.sync="visible" mode="selector" value="1" default-type="label" :default-props="defaultProps"
			:options="selectorList" @confirm="onConfirm($event,'selector')" ref="selector"></w-picker>
		<!-- 线下支付--确认尾款 -->
		<pop ref="pop" direction="center" height="fit-content" :is_mask="true" :width="80">
			<view class="mobile">
				<view class="mobile-text">
					上传截图<text style="font-size: 12px;color: orangered;">(只允许上传一张)</text>
				</view>
				<view v-if="backForm.fileId" style="width:140px;height:100px;margin: 5px auto;">
					<image style="width:140px;height:100px;" :src="imageUrls"></image>
				</view>
				<view class="mobile-input">
					<span @click="wkchooseImage">选择文件</span>
				</view>
				<view class="filetext" v-for="(file,index) in wkSelectFiles" :key="index">
					{{ file.name}}
				</view>
			</view>
			<view class="fott-btn">
				<view class="close" @click="cancleBack">关闭</view>
				<view class="confirm" @click="confirmBack">确认</view>
			</view>
		</pop>
		<!-- 确认订单 -->
		<pop ref="orderPop" direction="center" height="fit-content" :is_mask="true" :width="80">
			<view v-if="orderConfirmModel.payType === 40">
				<view class="mobile">
					<view class="mobile-text">
						上传截图<text style="font-size: 12px;color: orangered;">(只允许上传一张)</text>
					</view>
					<view v-if="imageUrls" style="width:140px;height:100px;margin: 5px auto;">
						<image style="width:140px;height:100px;" :src="imageUrls"></image>
					</view>
					<view class="mobile-input">
						<span @click="chooseImage">选择文件</span>
					</view>
					<view class="filetext" v-for="(file,index) in selectFiles" :key="index">
						{{ file.name}}
					</view>
				</view>
			</view>
			<view class="fott-btn">
				<view class="close" @click="confirmOrderCancle">关闭</view>
				<view class="confirm" @click="confirmOrderSave">确认</view>
			</view>
		</pop>
		</view>
		<!-- 修改订单弹窗 -->
		<!-- <uni-popup ref="popup" type="bottom" background-color="#fff" @change="change"> -->
			<view class="popup-box" v-if="isShowSel">
				<uni-section title="订单商品" type="line">
					<template v-slot:right>
						<!-- 新增商品 -->
						<uni-icons class="icons-text" style="color: #077840;" type="plusempty" size="30"
							@click="addGoods"></uni-icons>
					</template>
					<!-- 选择优惠券 -->
					<uni-forms ref="baseForm" label-width="200rpx" label-align="right" :modelValue="baseFormData">

						<uni-forms-item label="优惠券" required>
							<view v-if="couponList.length > 0">
								<view @click="onTogglePopupCoupon" v-if="userCouponId">
									{{userCouponVo.name}} >
								</view>
								<view v-else class="hascoupon" @click="onTogglePopupCoupon">
									{{ couponList.length }}张可用<text class="icon iconfont icon-jiantou"></text>
								</view>
							</view>
							<text v-else class="f24 gray9">无优惠券可用</text>
						</uni-forms-item>
						<uni-forms-item label="修改备注" required>
						<uni-easyinput
							style="width: 90%;display: inline-block;margin-top:5px;text-align: center;"
							:clearable='false' v-model="remark" placeholder="请输入修改备注备注" />
							</uni-forms-item>
						<uni-forms-item label="赠品信息" required v-if="giftProduct">
							<text class="f24 gray9">商品名称：{{giftProduct && giftProduct.productName}}</text>
							<br />
							<text
								class="f24 gray9">商品规格：{{giftProduct && (giftProduct.productAttr || (giftProduct.skuVo && giftProduct.skuVo.productAttr))}}</text>
							<br />
							<text class="f24 gray9">赠送数量：{{giftProduct &&  giftProduct.buyNum}}</text>
						</uni-forms-item>
						<uni-forms-item label="新订单信息" v-if="JSON.stringify(CalcData) != '{}'">
							<text class="f24 gray9">优惠金额：￥{{CalcData.couponPrice || '0.00'}}</text>
							<br />
							<text class="f24 gray9">定金：￥{{CalcData.depositTotalPrice || '0.00'}}</text>
							<br />
							<text class="f24 gray9">尾款：￥{{CalcData.finalTotalPrice || '0.00'}}</text>
							<br />
							<text class="f24 gray9">包装费：￥{{CalcData.packagePrice || '0.00'}}</text>
							<br />
							<text class="f24 gray9">总金额：￥{{CalcData.totalPrice || '0.00'}}</text>
							<br />
							<text class="f24 gray9">优惠后总金额：￥{{CalcData.orderPayPrice || '0.00'}}</text>
							<br />
							<text class="f24 gray9">补交定金金额：￥{{CalcData.restockDepositPrice || '0.00'}}</text>
							<br />
							<text class="f24 gray9">退款金额：￥{{CalcData.refundPrice || '0.00'}}</text>
						</uni-forms-item>
					</uni-forms>

					<uni-card :isFull="true">
						<!-- 原来的商品集合 -->
						<view style="position: relative;" class="popup-content" v-for="val in YLproductList"
							:key="val.id">
							<view class="popup-content-left">

								<view class="popup-box-custom-cover">
									<image class="popup-box-cover-image" mode="aspectFill" :src="val.imagePath">
									</image>
								</view>
								<view class="popup-content-text">
									<text>商品名称：{{val.productName}}</text>
									<text>规格：<span>{{val.productAttr}}</span></text>
									<text>最小起订数量：{{val.minBuyCount}}</text>
									<text>购买数量：{{val.totalNum || val.buyNum}}</text>
									<text>优惠金额：￥{{val.couponPrice || '0.00'}}</text>
									<text>定金价格：￥{{val.depositPrice || '0.00'}}</text>
									<text>定金比例：{{val.depositRatio}}</text>
									<text>尾款：￥{{val.finalPrice || '0.00'}}</text>
									<text>包装费：￥{{val.packagePrice || '0.00'}}</text>
									<text>商品金额：￥{{val.productPrice || '0.00'}}</text>
									<text>总金额：￥{{val.totalPayPrice || '0.00'}}</text>
									<text v-if="val.expectDeliveryTime">预计发货日期：{{val.expectDeliveryTime}}</text>
									<text v-if="val.deliveryNum">已发货数量：{{val.deliveryNum}}</text>
									<!-- <text>剩余发货数量：{{( Number(val.totalNum) - Number(val.deliveryNum)) || ''}}</text> -->
									<!-- <text v-if="val.productAddress">生产部门：{{val.productAddress}}</text> -->
								</view>
							</view>
							<view class="popup-content-right" style="text-align: right;width: 150rpx;">
								<!-- <uni-number-box @change="selCoupon(val)" :min="val.minBuyCount" :value="val.buyNum" /> -->
								<uni-easyinput style="width: 150rpx;display: inline-block;margin-bottom: 10px;text-align: center;" :clearable='false' v-model="val.buyNum" placeholder="请输入数量" @input="($event)=>selCoupon($event,val)" />
								<uni-data-select style="width: 150rpx;display: inline-block;text-align: center;"  @change="($event)=>selCoupon($event,val)" filterable :clear='false' v-model="val.orderProductType" :localdata="orderProductTypeList"
									placeholder="商品类型"></uni-data-select>
							</view>
							<!-- 删除 -->
							<uni-icons v-if="YLproductList.length > 1" style="color: red;position: absolute;right: 0;top: 10px;" type="trash" size="30"
								@click="delRow(val)"></uni-icons>
						</view>
					</uni-card>
					<view class="button-group">
						<button type="primary" size="mini" v-loading="submitLoading" @click="submit()">提交</button>
					</view>
				</uni-section>
			</view>
		<!-- </uni-popup> -->
		<!-- 选择商品弹窗 -->
		<!-- <uni-popup ref="popupGoods" type="bottom" background-color="#fff"> -->
			<view class="popup-goods-box" v-if="isShowAdd">
				<uni-section title="选择商品" type="line">
					<template v-slot:right>
						<view style="display: flex;">
							<!-- 选择 -->
							<uni-easyinput prefixIcon="search" v-model="baseFormData.productName" placeholder="请搜索商品名称">
							</uni-easyinput>
							<uni-icons style="color: #077840;" type="checkmarkempty" class="icons-text" size="35"
								@click="selAddGoods"></uni-icons>
						</view>
					</template>
					<uni-card :isFull="true">
						<template v-slot>
							<mescroll-body bottom-offset="20" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
								:up="upOption" height="20" style="min-height: 0;">
							<view class="popup-content" v-for="val in spList" :key="val.id">
								<view class="popup-content-left">
									<checkbox-group @change="($event)=>checkboxChange($event,val)">
									<!-- val.stockNum == 0 || -->
										<checkbox :disabled="val.disabled" :checked="val.check" />
									</checkbox-group>
									<view class="popup-box-custom-cover">
										<image class="popup-box-cover-image" mode="aspectFill" :src="val.imagePath">
										</image>
									</view>
									<view class="popup-content-text">
										<text>商品名称：{{val.productName}}</text>
										<text>品种：{{val.categoryParentName}}</text>
										<text>分类：{{val.categoryName}}</text>
										<text>规格：<span>{{val.sku}}</span></text>
										<text>库存：{{val.stockNum}}</text>
										<text>定金比例：{{val.depositRatio}}</text>
										<text>优惠金额：￥{{val.couponPrice || '0.00'}}</text>
										<text>种植基地：{{val.produceAddressTxt}}</text>
									</view>
								</view>

							</view>
							</mescroll-body>
						</template>
					</uni-card>
				</uni-section>
			</view>
		<!-- </uni-popup> -->
		<!--优惠券-->
		<Coupon :isCoupon="isCoupon" :couponList="couponList" @close="closeCouponFunc"></Coupon>
		<!-- 商品券弹窗选择 -->
		<selectProduct :isCoupon="isSelectProduct" :couponList="YLproductList" @close="closeSelectProduct">
		</selectProduct>
		<!-- 提示窗示例 -->
		<uni-popup ref="alertDialog" type="dialog">
			<uni-popup-dialog type="warn" cancelText="取消" confirmText="同意" title="提示" content="确认关闭该订单吗?"
				@confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
		</uni-popup>
	</view>
</template>

<script>
	import uniCalendar from '@/components/uni-calendar/uni-calendar.vue'
	import wPicker from "@/components/w-picker/w-picker.vue";
	import pop from "@/components/ming-pop/ming-pop.vue"
	import Coupon from "@/components/coupon.vue"
	import selectProduct from "@/components/select-product.vue"
	import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
	export default {
		mixins: [MescrollMixin],
		components: {
			uniCalendar,
			wPicker,
			pop,
			Coupon,
			selectProduct
		},
		data() {
			return {
				CalcData:{},
				remark:'',
				downOption: {
					use: false,
					auto: false //是否在初始化后,自动执行downCallback; 默认true
				},
				isShowAll:true,
				isShowSel:false,
				isShowAdd:false,
				orderProductTypeList:[
					  {
					 text : '销售',
					  value: 10
					},
					{
					  text: '赠品',
					  value: 20
					},
					{
					  text: '赔付',
					  value: 30
					}
				],
				upOption: {
					page: {
						num: 0,
						size: 10,
						time: null
					},
					auto: false, // 不自动加载
					noMoreSize: 5, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
					empty: {
						tip: '~ 空空如也 ~', // 提示
						icon: '/static/home/saber.png'
					},
					textNoMore: '—— 没有更多了 ——'
				},
				searchGoodsVal: '',
				tableData: [],
				current: 0,
				baseFormData: {},
				submitLoading: false,
				couponList: [],
				userCouponId: '', //优惠券id
				giftProduct: {},
				userCouponVo: {},
				isCoupon: false,
				spList: [],
				isSelectProduct: false,
				YLproductList: [],
				productTypes: [{
						name: '快递',
						value: 10
					},
					{
						name: '自提',
						value: 20
					},
				],
				value: '',
				items: ['付款记录', '发货记录', '退款记录'],
				baseFormData: {},
				range: [{
					value: 0,
					text: "测试客户"
				}, ],
				sexs: [{
					text: '种苗',
					value: 0
				}, {
					text: '种子',
					value: 1
				}, {
					text: '大小',
					value: 2
				}],
				refOptions: [20, 30, 40],
				type: 'center',
				backForm: {
					orderNumber: '',
					orderId: '',
					paySource: '',
					payTime: '',
					tradeNo: '',
					fileId: '',
				},
				imageUrls: '',
				datalist: '',
				status: 0,
				showModal: false,
				goods_info: [],
				info: [],
				item: '',
				id: 0,
				killTimeh: '',
				killTimem: '',
				killTimes: '',
				isIphone: false,
				// 生产部门的参数
				visible: false,
				defaultProps: {
					"label": "title"
				},
				selectorList: [],
				// 日历
				info: {
					lunar: true,
					range: false,
					insert: false,
					selected: [],
					data: '',
					startDate: ''
				},
				pitchItem: '',
				isNoEX: true,
				selectInfo: {},
				orderPick: {

				},
				orderConfirmItem: {}, //确认订单选择数据
				orderConfirmModel: {
					orderId: '',
					pickupTime: '',
					paySource: '',
					payTime: '',
					tradeNo: '',
					payType: 0,
					timeType: '',
					fileId: ''
				},
				selectFiles: [],
				wkSelectFiles: [],
				setTimeProduct: null
			};
		},
		watch:{
			"baseFormData.productName":{
				handler(v) {
					this.productPageSkuFun();
				},
				deep:true,
			}
		},
		computed: {
			filteredList() {
				return this.spList.filter(item => {
					return item.productName.toLowerCase().includes(this.searchGoodsVal.toLowerCase());
				});
			}
		},
		onLoad(option) {
			this.id = option.orderId
			this.orderDetail()
			// this.productionDepartment()
			let that = this
			wx.getSystemInfo({
				success: res => {
					let modelmes = res.model;
					let iPhoneArr = ['iPhone X', 'iPhone 11', 'iPhone Pro Max', 'iPhone Pro', 'iPhone 12']
					iPhoneArr.forEach(function(item) {
						if (modelmes.search(item) != -1) {
							that.isIphone = true
						}
					})
				}
			})
		},
		methods: {
			previewImage(url) {
				uni.previewImage({
				  urls: [url]
				})
			},
			downCallback() {
				this.mescroll.resetUpScroll()
			},
			upCallback(page) {
				console.log(page,'page')
				let pageNum = page.num; // 页码, 默认从1开始
				let pageSize = page.size;
				const $this = this
				this.api.productPageSku({
					pageIndex: pageNum,
					pageSize,
					// productType:1 // 普通商品 1
				}).then(res => {
					const {
						code,
						data
					} = res.data;
					console.log(data, 'data.records')
					// if (page.num == 1) this.spList = [];
					const totalCount = data.total
					const orderLength = data.records.length
					this.mescroll.endBySize(orderLength, totalCount);
					// if (data.records) {
						data.records.map(val => {
							val['value'] = val.userId
							val['text'] = val.realName
							val['check'] = false;
						})
						// this.spList = data.records;
						this.spList = this.spList.concat(data.records);
						// 回显选中的
						if (this.YLproductList && this.YLproductList.length) {
							this.spList.map(val => {
								if ((this.YLproductList.map(item => item.productSkuId)).includes(val
										.productSkuId)) {
									// val['check']= true
									val['disabled'] = true;
								}
							})
						}
					// }
					// if (data.productList && data.productList.records) {
					// 	data.productList.records.map(val => {
					// 		val['value'] = val.userId
					// 		val['text'] = val.realName
					// 		val['check'] = false;
					// 	})
					// 	this.spList = data.productList.records;
					// }
				}).catch(e=>{
					this.mescroll.endSuccess()
				})
			},
			onClickItem(e) {
				if (this.current !== e.currentIndex) {
					this.current = e.currentIndex
				}
				// if (this.current == 1) {
				// 	// 发货记录
				// 	this.getData();
				// }
			},
			// 修改订单保存
			submit(baseForm) {
				if(this.YLproductList.some(val=>!val.orderProductType)){
					return this.tui.toast('请选择商品类型!')
				}
				this.submitLoading = true;
				// 最新参数
				let obj = {
					orderId: this.datalist.orderId,
					couponId: this.userCouponId,
					userId: this.datalist.userId,
					remark: this.remark,
					productParams: this.YLproductList,
					giftProduct: this.giftProduct
				}
				this.api.updateOrderNums(obj).then(res => {
					const {
						code,
						msg
					} = res.data;
					console.log(res, 'res')
					this.submitLoading = false;
					this.tui.toast('提交成功，正在审核')
					if (code === 1) {
						// this.$refs.popup.close()
						this.isShowAll = true;
						this.isShowSel = false;
						this.isShowAdd = false;
					}
				})

			},
			checkboxChange(e, row) {
				// if (row.stockNum == 0 && !row.check) {
				// 	row.check = false;
				// 	this.tui.toast('该商品库存不足!')
				// 	return;
				// } else {
					row.check = !row.check;
					if (row.check && !row.buyNum) {
						row.buyNum = row.minBuyCount
					}
				// }

				// 选中之后选中规格
				// if (row.check) {
				// 	await this.skuList(row, row.productId);
				// }
			},
			// 获取商品
			productPageSkuFun() {
				// productLists 
				this.api.productPageSku({
					pageIndex: 1,
					pageSize: 10,
					productName:this.baseFormData.productName
					// productType:1 // 普通商品 1
				}).then(res => {
					const {
						code,
						data
					} = res.data;
					console.log(data, 'data.records')
					this.spList = [];
					if (data.records) {
						data.records.map(val => {
							val['value'] = val.userId
							val['text'] = val.realName
						})
						this.spList = data.records;
						// 回显选中的
						if (this.YLproductList && this.YLproductList.length) {
							this.spList.map(val => {
								if ((this.YLproductList.map(item => item.productSkuId)).includes(val
										.productSkuId)) {
									// val['check']= true
									val['disabled'] = true;
								}
							})
						}
					}

				})
			},
			// 选择优惠券 编辑数量
			selCoupon(e,val) {
				console.log(Number(e),'val')
				console.log(val.stockNum,'val')
				val.buyNum = e;
				if(Number(e)  > val.stockNum){
					this.tui.toast('超过库存数量了')
					return
				}
				this.$forceUpdate();
				this.YLproductList = JSON.parse(JSON.stringify(this.YLproductList))
				this.$nextTick(() => {
					this.orderModifyCalc();
				})
			},
			/*选择优惠卷*/
			onTogglePopupCoupon() {
				console.log(11111)
				let self = this;
				self.isCoupon = true;
				self.couponList = this.couponList;
			},
			/*关闭优惠券*/
			closeCouponFunc({
				item,
				couponType,
				e
			}) {
				console.log(item, couponType, e, 'werrew')
				// if (!e) return;
				this.isCoupon = false;
				this.userCouponId = e || 0;
				this.userCouponVo = item
				if (couponType == 40) {
					this.isSelectProduct = true;
				}
				this.$nextTick(() => {
					this.orderModifyCalc();
				})

			},
			// 关闭选择优惠券商品
			closeSelectProduct({
				row,
				e
			}) {
				console.log(row, 'closeSelectProduct')
				this.giftProduct = row;
				this.isSelectProduct = false;
				this.$nextTick(() => {
					this.orderModifyCalc();
				})
			},
			// 计算接口
			orderModifyCalc() {
				let Obj = {
					orderId: this.datalist.orderId,
					couponId: this.userCouponId,
					userId: this.datalist.userId,
					productParams: this.YLproductList,
					giftProduct: this.giftProduct
				}
				this.api.orderModifyCalc(Obj, true).then(res => {
					console.log(res, 'res')
					const {
						code,
						data,
						msg
					} = res.data;
					if (code == 1) {
						// 数据清空
						this.couponList = [];
						this.userCouponId = '';
						this.CalcData = data;
						this.couponList = data.couponList;
						data.userCouponVo && (this.userCouponId = data.userCouponVo.userCouponId)
						data.userCouponVo && (this.userCouponVo = data.userCouponVo)
						// 赠品
						// if (data.giftProduct) {
							this.giftProduct = data.giftProduct;
						// }
						// 商品信息 计算回来的覆盖金额
						if (data.productList) {
							this.YLproductList.map(val => {
								data.productList.map(item => {
									if (val.productId == item.productId) {
										val.couponPrice = item.couponPrice
										val.depositPrice = item.depositPrice
										val.packagePrice = item.packagePrice
										val.totalPayPrice = item.totalPayPrice
										val.finalPrice = item.finalPrice
									}
								})
							})
						}
						// 强制刷新
						this.YLproductList = JSON.parse(JSON.stringify(this.YLproductList))
					}else{
						this.tui.toast(msg)
					}

				})
			},
			// 前端删除
			delRow(row) {
				const set1 = new Set([row].map(item => item['productSkuId']))
				const set2 = new Set(this.YLproductList.map(item => item['productSkuId']))
				const diff = [
					...[row].filter(item => !set2.has(item['productSkuId'])),
					...this.YLproductList.filter(item => !set1.has(item['productSkuId']))
				]
				this.YLproductList = diff;
				this.$nextTick(() => {
					this.orderModifyCalc();
				})
			},
			// 发货详情
			goFHDetails(val) {
				uni.navigateTo({
					url: '/pages/orderList/confirmDelivery/deliveryCourier/deliveryCourierView?orderDeliveryId=' +
						val.orderDeliveryId
				})
			},
			// 获取订单下的发货记录
			getData() {
				let self = this;
				let Params = {};
				Params.pageIndex = 1;
				Params.pageSize = 999999;
				Params.orderNo = this.id
				this.api.deliveryPage(Params, true)
					.then(res => {
						console.log(res, 'res')
						const {
							code,
							data
						} = res.data;
						if (code == 1) {
							self.tableData = data.records;
						}

					})

			},
			filterTypeName(value) {
				const item = this.productTypes.find(f => f.value === value)
				if (item)
					return item.name
				return ''
			},


			// 选择新商品
			selAddGoods() {
				console.log(this.spList.filter(val => val.check), '选中的商品');
				let SelctProduct = this.spList.filter(val => val.check);

				this.YLproductList = this.YLproductList.concat(SelctProduct);
				// this.$refs.popupGoods.close()
				this.isShowAll = false;
				this.isShowSel = true;
				this.isShowAdd = false;
				//计算接口
				this.$nextTick(() => {
					this.orderModifyCalc();
				})
			},
			// 新增商品
			async addGoods() {
				await this.productPageSkuFun();
				// this.$refs.popupGoods.open()
				this.isShowAll = false;
				this.isShowSel = false;
				this.isShowAdd = true;

			},
			dialogClose() {
				this.$refs.alertDialog.close()
			},
			dialogConfirm() {
				let obj = {
					orderId: this.id
				}
				this.api.orderClose(obj).then(res => {
					const {
						code,
						data,
						msg
					} = res.data;
					if (code == 1) {
						this.tui.toast(`关闭订单成功`)
						this.$refs.alertDialog.close()
					} else {
						this.tui.toast(msg)
					}
				})
			},
			// 删除订单
			closeOrder() {
				this.$refs.alertDialog.open()

			},
			toggle(type) {
				this.type = type
				// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
				// this.$refs.popup.open()
				this.isShowAll = false;
				this.isShowSel = true;
				this.isShowAdd = false;
			},
			change(e) {
				console.log('当前模式：' + e.type + ',状态：' + e.show);
			},
			gotoClick(item) {

				uni.navigateTo({
					url: '/pages/orderList/confirmDelivery/deliveryCourier/deliveryCourier?orderId=' + item.orderId
				})
			},
			timeSelect(type) {
				this.orderConfirmModel.timeType = type
				this.$refs.calendar.open()
			},
			// 日历确认
			confirm(e) {
				const $this = this
				const model = $this.orderConfirmModel
				const defaultId = model.orderId
				const setp = this.setTimeProduct
				if (setp != null) {
					const productList = $this.datalist.productList
					productList.forEach((prod, index) => {
						if (prod.orderProductId === setp.orderProductId)
							$this.$set(prod, 'expectDeliveryTime', e.fulldate)
					})
					this.setTimeProduct = null
				} else {
					if (model.type === 'orderConrim') {
						//确认订单
						//设置发货或提货时间
						if (model.timeType === 'order-fh') {
							$this.orderConfirmModel.pickupTime = e.fulldate
							$this.datalist.productList.forEach((prod, index) => {
								$this.$set(prod, 'expectDeliveryTime', e.fulldate)
							})
						}
						if (model.payType === 40 && model.timeType === 'order-zf') {
							//如果线下支付订单，设置线下支付的时间
							$this.orderConfirmModel.payTime = e.fulldate
						}
					} else if (model.timeType === 'order-wk') {
						$this.backForm.payTime = e.fulldate
					}
				}
			},
			// 关闭日历
			close(e) {
				this.calendar = false
			},
			setProdcutTime(item, item1) {
				this.setTimeProduct = item1
				this.$refs.calendar.open()
			},
			//确认订单
			confirmOrder(item) {
				const $this = this
				if (item.payType === 40) {
					//线下支付订单
					$this.orderConfirmModel = {
						orderId: item.orderId,
						pickupTime: "",
						paySource: "",
						payTime: "",
						tradeNo: "",
						payType: item.payType,
						type: 'orderConrim'
					}
					$this.$refs['orderPop'].show()
				} else {
					const postForm = {
						orderId: item.orderId,
						products: []
					}
					console.log('postForm', postForm)
					const isTrue = this.checkProdcutTime(postForm.orderId)
					if (isTrue) {
						postForm.products = this.getCheckProducts(postForm.orderId)
						this.postOrderConfirm(postForm)
					}
				}
			},

			checkProdcutTime(orderId) {
				let list = this.datalist.productList
				let isvlidate = true
				for (let i = 0; i < list.length; i++) {
					const pRow = list[i]
					if (!pRow.expectDeliveryTime) {
						isvlidate = false;
						break
					}
				}
				if (!isvlidate) {
					this.tui.toast(`请选择发货或提货时间`)
					return
				}
				return isvlidate
			},
			getCheckProducts(orderId) {
				let list = this.datalist.productList
				const newProducts = []
				for (let j = 0; j < list.length; j++) {
					const pRow = list[j]
					newProducts.push({
						orderProductId: pRow.orderProductId,
						pickupTime: pRow.expectDeliveryTime
					})
				}
				return newProducts
			},
			postOrderConfirm(model) {
				const $this = this
				uni.showLoading({
					title: '确认中...'
				})
				$this.api.confirmOrder(model)
					.then(res => {
						const {
							code,
							msg
						} = res.data
						uni.hideLoading()
						if (code === 1) {
							$this.orderDetail()
							$this.confirmOrderCancle()
						} else {
							this.tui.toast('订单确认失败')
							this.tui.toast(msg)
						}
					})
					.catch(err => {
						$this.tui.toast('订单异常')
						uni.hideLoading()
					})
			},
			//确认订单取消
			confirmOrderCancle() {
				const $this = this
				$this.orderConfirmModel = {
					orderId: '',
					pickupTime: "",
					paySource: "",
					payTime: "",
					tradeNo: "",
					payType: 0,
					type: '',
					fileId: ''

				}
				$this.selectFiles = []
				$this.$refs['orderPop'].close()

			},
			// 确认订单保存
			confirmOrderSave(item) {
				const $this = this
				const model = this.orderConfirmModel
				const postModel = {
					...model
				}
				if (model.payType === 40 && $this.selectFiles.length <= 0) {
					this.tui.toast(`请上传截图`)
					return
				}
				uni.showLoading({})
				$this.api.confirmOrder(model)
					.then(res => {
						$this.isTrue = false
						const {
							code,
							msg
						} = res.data
						if (code === 1) {
							this.tui.toast('订单确认成功')
							$this.orderDetail()
							$this.confirmOrderCancle()
						} else {
							this.tui.toast('订单确认失败')
							this.tui.toast(msg)
						}
						uni.hideLoading()
					})
					.catch(err => {
						$this.tui.toast('订单异常')
						$this.isTrue = false
						uni.hideLoading()
					})
			},
			formaterTime(time) {
				if (time) {
					const date = new Date(time)
					const year = date.getFullYear()
					const month = date.getMonth() + 1
					const day = date.getDate()
					return `${year}-${month >=10? month :'0'+month }-${day>=10? day :'0'+day}`
				}
				return ''
			},
			// 订单详情
			orderDetail() {
				uni.showLoading({})
				this.api.orderDetail({
						orderId: this.id
					})
					.then(res => {
						uni.hideLoading()
						this.datalist = res.data.data
						// 详情页面获取赠品
						let giftProduct;
						if (this.datalist.productList) {
							this.YLproductList = this.datalist.productList.filter(val => val.isGift == 0)
							// 如果没有购买数量 那么最小购买数量就是
							this.YLproductList.map(val => {
								if (!val.buyNum) {
									val['buyNum'] = val.minBuyCount
								}
							})
							giftProduct = this.datalist.productList.filter(val => val.isGift == 1)
							this.giftProduct = giftProduct[0]
						}

					})
					.catch(err => {
						this.tui.toast(err)
						uni.hideLoading()
					})
			},
			price(item1, item) {
				console.log(item1);
				console.log(item);
				// item.order_goods.forEach(citem=>{
				// 	citem
				// })
				if (item1.group_type == 0) {
					if (item1.classifyname != '种苗') {
						if (item.all_amount < 100000) {
							if (item1.amount < 10000) {
								item1['price_money'] = item1.goods_detail.retail_price
							} else if (item1.amount < 100000) {
								item1['price_money'] = item1.goods_detail.price_one
							} else {
								item1['price_money'] = item1.goods_detail.price_two
							}
						} else {
							item1['price_money'] = item1.goods_detail.price_two
						}
					} else {
						if (item.all_amount < 100000) {
							if (item1.amount < 10000) {
								item1['price_money'] = item1.goods_detail.zhongmiao_price
							} else if (item1.amount < 100000) {
								item1['price_money'] = item1.goods_detail.zhongmiao_price_one
							} else {
								item1['price_money'] = item1.goods_detail.zhongmiao_price_two
							}
						} else {
							item1['price_money'] = item1.goods_detail.zhongmiao_price_two
						}
					}
				} else {
					item1['price_money'] = item1.retail_price
				}
				console.log(item1.price_money);
				return item1.price_money
			},
			// 针对于退款 显示时间
			timeShow(time, spec, self, stock, amount, item1) {
				// time后台配置的时间系数，spec规格,self判断是快递还是自提
				// console.log(stock);
				// console.log(amount);
				if (item1.group_type == 0) {
					let cn = spec.split(',')[0] //获取是什么类型
					if (cn == '种子') {
						if (self == 0) {
							return '预计一周内可自提'
						} else {
							return '预计一周内可发货'
						}
					} else if (cn == '种苗') {
						if (self == 0) {
							return '预计' + (Number(time) + 7) + '天后可自提'
						} else {
							return '预计' + (Number(time) + 7) + '天后可发货'
						}
					} else if (cn == '种球') {
						if (self == 0) {
							return '待业务员确认订单后确认自提时间'
						} else {
							return '待业务员确认订单后确认发货时间'
						}
					}
				}
				if (item1.group_type != 0) {
					if (self == 0) {
						let c = this.formDate(item1.date)
						return '确定在' + c + '可自提'

					}
					if (self != 0) {
						let c = this.formDate(item1.date)
						return '确定在' + c + '可发货'
					}
				}
			},
			// 生产部门
			productionDepartment() {
				this.api.productionDepartment()
					.then(res => {
						console.log(res.data.data);
						this.selectorList = res.data.data
						console.log(this.selectorList);
					})
					.catch(err => {
						this.tui.toast(err)
					})
			},
			// picker确认
			onConfirm(e) {
				this.pitchItem.department = e.obj.title
			},

			// 退款
			refund(item) {
				var that = this
				uni.showModal({
					title: '确认取消这笔订单？',
					content: '退款将退回给客户，取消后无法撤销',
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
							// if(item.status==1||item.status==2||item.status==3){
							// 	that.api.payRefund({
							// 		id:item.id,
							// 		uid:uni.getStorageSync('uid')
							// 	})
							// 	.then(res=>{
							// 		console.log(res);
							// 		that.tui.toast('退款成功')
							// 		this.orderDetail()
							// 		uni.$emit('detailStatus')
							// 	})
							// 	.catch(err=>{})
							// }else{
							// 	console.log(item.id);
							// 	that.api.payRefundAll({
							// 		id:item.id,
							// 		uid:uni.getStorageSync('uid')
							// 	})
							// 	.then(res=>{
							// 		console.log(res);
							// 		that.tui.toast('退款成功')
							// 		this.orderDetail()
							// 		uni.$emit('detailStatus')
							// 	})
							// 	.catch(err=>{this.tui.toast(err)})
							// }
							if (item.is_final_payment == 0) {
								that.api.payRefund({
										id: item.id,
										uid: uni.getStorageSync('uid')
									})
									.then(res => {
										if (res.data.code == 200) {
											that.tui.toast('退款成功')
											that.orderListAll(10)
											that.changetab(8, 10)
										} else {
											that.tui.toast(res.data.data)
										}
										console.log(res);
									})
									.catch(err => {})
								// 1 是已经付尾款了
							} else {
								that.api.payRefundAll({
										id: item.id,
										uid: uni.getStorageSync('uid')
									})
									.then(res => {
										console.log(res);
										if (res.data.code == 200) {
											that.tui.toast('退款成功')
											that.orderListAll(10)
											that.changetab(8, 10)
										} else {
											that.tui.toast(res.data.data)
										}
									})
									.catch(err => {
										that.tui.toast(err)
									})
							}
						} else if (res.cancel) {

						}
					}
				});
			},

			// 确认支付尾款
			confirmPayment(item) {
				console.log(item);

				const $this = this
				$this.orderPick = {
					type: 'back',
					value: item
				}
				$this.backForm.orderId = item.orderId
				$this.backForm.orderNumber = item.orderNo
				$this.$refs['pop'].show()
			},
			chooseImage() {
				const $this = this
				uni.chooseImage({
					count: 1,
					sourceType: ['album', 'camera'],
					success: function(res) {
						$this.selectFiles = res.tempFiles
						$this.uploadImages(res.tempFiles[0], 'qrdd')
					}

				})
			},
			// 上传凭证
			wkchooseImage(Bill) {
				console.log(Bill,'Bill')
				const $this = this
				uni.chooseImage({
					count: 1,
					sourceType: ['album', 'camera'],
					success: function(res) {
						$this.wkSelectFiles = res.tempFiles
						$this.uploadImages(res.tempFiles[0], 'qrwk',Bill)
					}
				})
			},
			confirmBack() {
				const $this = this
				if ($this.wkSelectFiles.length <= 0) {
					$this.tui.toast('请上传付款截图')
					return
				}
				this.api.confirmBack($this.backForm)
					.then(result => {
						if (result.data.code === 1) {
							$this.orderDetail()
							$this.tui.toast(result.data.msg)
							$this.cancleBack()
						} else {
							$this.tui.toast(result.data.msg)

						}
					})
			},
			cancleBack() {
				const $this = this
				this.backForm.paySource = ''
				this.backForm.payTime = ''
				this.backForm.tradeNo = ''
				this.wkSelectFiles = []
				this.backForm.fileId = ''
				$this.$refs['pop'].close()

			},
			uploadImages(file, type,Bill='') {
				const $this = this
				$this.api.uploadImage(file)
					.then(result => {
						const {
							code,
							data,
							msg
						} = result
						if (code === 1) {
							if (type === 'qrdd') {
								$this.orderConfirmModel.fileId = data.fileId
								$this.imageUrls = data.filePath
							} else {
								$this.imageUrls = data.filePath
								$this.backForm.fileId = data.fileId
								// 付款记录上传凭证
								$this.api.billConfirm({ billId:Bill.billId, fileId: data.fileId }).then(res=>{
									console.log(res,'res')
									const {
										code,
										data,
										msg
									} = res
									$this.tui.toast(msg)
									if(code == 1){
										this.orderDetail();
									}else{
									}
								})
							}
						} else {
							$this.tui.toast(msg)
						}
						console.log('res', result)
					}).catch(error => {
						console.log('res', error)
					})
			},
			// 订单全部列表

			orderListAll(status) {
				this.api.orderListAll({
					uid: uni.getStorageSync('uid'),
					status,
					pageIndex: 1,
					pageSize: 10
				}).then(res => {

				})
			},
			// 补发
			reissue(item) {
				console.log(item);
				if (item.Eve != '已全部发货' && item.Eve != '已全部自提') {
					if (item.status == 4) {
						uni.navigateTo({
							url: '/pages/orderList/confirmDelivery/deliveryAllOrPart/deliveryAllOrPart?status=' +
								item.status + '&id=' + item.id + '&order_id=' + item.id
						})
					}
					if (item.status == 5) {
						uni.navigateTo({
							url: '/pages/orderList/confirmDelivery/deliveryCourier/deliveryCourier?status=' + item
								.status + '&id=' + item.id + '&order_id=' + item.id
						})
					}
				}
			},
			// 查看评价
			checkEvaluation(item) {
				console.log(12);
				uni.navigateTo({
					url: '/pages/orderList/historyEvaluation/historyEvaluation?order_id=' + item.id
				})
			},
			// 拒绝
			reject(item) {
				var that = this
				uni.showModal({
					title: '确定拒绝该退款？',
					content: '拒绝后无法取消',
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
							this.orderDetail()
							uni.$emit('detailStatus')
						} else if (res.cancel) {
							console.log('用户点击取消');

						}
					}
				});
			},
			// 同意
			aggree(item) {
				var that = this
				uni.showModal({
					title: '确定同意该退款？',
					content: '同意后无法取消',
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
							this.orderDetail()
							uni.$emit('detailStatus')
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			product(item1) {
				if (this.datalist.status == 2) {
					this.pitchItem = item1
					this.$refs.selector.show()
				}
				// item.department=''
			},
			// 分割字符串
			Unsplit(goods_spec) {
				console.log(goods_spec);
				var spec = goods_spec.split(',')
				console.log(spec)
				return spec[1] + '枝/扎' + '; ' + spec
			},
			getEndTime(endtime) {
				// console.log(endtime,34);
				let timer = setInterval(() => {
					// 当前时间戳（ms）
					let nowTime = (new Date).getTime();
					// 倒计时(s)
					let resTime = Math.floor((parseInt(endtime) - nowTime / 1000));
					// console.log(resTime,23);
					if (resTime < 0) {
						clearInterval(timer);
						return
					}
					// 转成时分秒
					let h = Math.floor(resTime / 3600);
					h = h < 10 ? '0' + h : h;
					let m = Math.floor((resTime % 3600) / 60);
					m = m < 10 ? '0' + m : m;
					let s = resTime % 60;
					s = s < 10 ? '0' + s : s;
					this.killTimeh = h;
					this.killTimem = m;
					this.killTimes = s;
					// console.log( this.killTimes,45);
				}, 1000)

			},

			timeV(item, item1) {
				this.pickItem = {
					order: item,
					product: item1
				}
				setTimeout(() => {
					this.$refs.calendar.open()
				}, 200)

			},
			// 获取现在的时间戳
			nowTime() {
				let times = new Date()
				// console.log(times);
				let year = times.getFullYear()
				let m = times.getMonth() + 1
				let d = times.getDate()
				let csv = year + '-' + m + '-' + d
				return csv
			},
			// 获取传入下单时间跟天数
			pickTime(create, time) {
				let cn = Number(time)
				let cs = cn * 1000 * 60 * 60 * 24
				let ctime = new Date(cs + Number(create) * 1000)
				let y = ctime.getFullYear()
				let m = ctime.getMonth() + 1
				let d = ctime.getDate()
				let csv = y + '-' + m + '-' + d
				return csv
			},
			// // 获取传入天数
			// pickTime(time) {
			// 	let cn = Number(time)
			// 	let cns = new Date().getTime()
			// 	let cs = cn * 1000 * 60 * 60 * 24
			// 	let ctime = new Date(cs + cns)
			// 	let y = ctime.getFullYear()
			// 	let m = ctime.getMonth() + 1
			// 	let d = ctime.getDate()
			// 	let csv = y + '-' + m + '-' + d
			// 	return csv
			// },
			formDate(date) {
				console.log(date);
				const dt = new Date(Number(date) * 1000)
				const y = dt.getFullYear()
				const m = (dt.getMonth() + 1 + '').padStart(2, '0')
				const d = (dt.getDate() + '').padStart(2, '0')
				const hh = (dt.getHours() + '').padStart(2, '0')
				const mm = (dt.getMinutes() + '').padStart(2, '0')
				const ss = (dt.getSeconds() + '').padStart(2, '0')

				return `${y}-${m}-${d}`
			},
			formDatev(date) {
				const dt = new Date(Number(date) * 1000)
				const y = dt.getFullYear()
				const m = (dt.getMonth() + 1 + '').padStart(2, '0')
				const d = (dt.getDate() + '').padStart(2, '0')
				const hh = (dt.getHours() + '').padStart(2, '0')
				const mm = (dt.getMinutes() + '').padStart(2, '0')
				const ss = (dt.getSeconds() + '').padStart(2, '0')

				return `${y}-${m}-${d} ${hh}:${mm}:${ss} `
			},
			// 是否是农资订单
			isFarmGoodOrder(orderInfo) {
				let goods = orderInfo.goods_info;
				if (!goods || goods.length === 0) {
					return false;
				}
				let arr = goods[0].spec.split(',');
				if (arr.length === 0) {
					return false;
				}
				return arr[0] === '农资';
			}
		}
	}
</script>
<style scoped>
	page {
		background-color: #F9F9F9;
	}

	/deep/.usable-coupon .main {
		margin-bottom: 0px !important;
	}
	/deep/.uni-forms-item{
		margin-bottom: 10rpx!important;
	}
	/deep/.popup-box .uni-section .uni-section-header{
		position: fixed;top: 45px;z-index: 2000;width: 95%;background: #fff;
	}
	/deep/.popup-goods-box .uni-section .uni-section-header{
		position: fixed;top: 45px;z-index: 2000;width: 95%;background: #fff;
	}
	.popup-goods-box .uni-section .uni-section-content{
		margin-top: 60px;
	}
	
	/deep/.popup-box .uni-section .uni-section-content{
		margin-top: 60px;
	}
	
</style>
<style lang="less" scoped>
	.orderDetail {
		padding-bottom: 100rpx;
		box-sizing: border-box;
	}
	.card-box {
		display: flex;
		flex-wrap: wrap;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		margin-bottom: 10rpx;

		// border-bottom: 2rpx solid #077840;
		.card-box-text {
			flex: 1;
		}
	}

	.button-group {
		position: fixed;
		bottom: 0;
		/* left: 40%; */
		width: 100%;
		background: #fff;
		padding-top: 10px;
	}

	.hascoupon {
		padding: 0 18rpx;
		box-sizing: border-box;
		height: 38rpx;
		line-height: 38rpx;
		border-radius: 200rpx;
		color: #ffffff;
		background: linear-gradient(180deg, #fc4133, #ff7a04);
		font-size: 20rpx;
		width: fit-content;

		.icon.icon-jiantou {
			color: #ffffff;
			font-size: 20rpx;
			margin-left: 2rpx;
		}
	}

	.uni-collapse-content {
		margin: 30rpx;
		border-radius: 12rpx;
	}

	.popup-content-text {
		uni-text {
			display: block;
		}
	}

	.popup-content {
		margin: 5px 0;
		border-bottom: 1px solid #077840;
	}

	.slot-text {
		font-size: 26rpx;
		margin: 0 10rpx;
	}

	.for-payment {
		width: 100%;
		height: 110rpx;
		line-height: 110rpx;
		font-size: 36rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #077840;
		padding: 0 30rpx;
		box-sizing: border-box;
	}

	.logistics {
		display: flex;
		justify-content: space-between;
		width: 690rpx;
		height: 152rpx;
		background: #FFFFFF;
		border-radius: 8rpx;
		padding: 0 30rpx;
		margin: 0 auto;
		box-sizing: border-box;
		margin-bottom: 30rpx;

		.left-text {
			flex: 1;
			padding: 30rpx 0;
			box-sizing: border-box;
			font-size: 26rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;

			.text2 {
				color: #077840;
				margin-bottom: 20rpx;
			}

			.remain-time {
				color: #333333;

				span {
					display: inline-block;
					width: 40rpx;
					height: 40rpx;
					background: #333333;
					border-radius: 8rpx;
					margin: 0 10rpx;
					color: #fff;
					text-align: center;
					line-height: 40rpx;
				}
			}
		}

		.text {
			flex: 1;
			font-size: 26rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #077840;
			line-height: 152rpx;
		}

		.text1 {
			flex: 1;
			font-size: 26rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #077840;
			padding: 40rpx 0;
			box-sizing: border-box;
		}

		.img {
			width: 152rpx;
			height: 100rpx;
			margin-top: 26rpx;
			margin-left: 40rpx;

			image {
				width: 100%;
				height: 100%;
				object-fit: cover;
			}

		}
	}

	.address {
		width: 690rpx;
		height: 160rpx;
		margin: 0 auto;
		background: #FFFFFF;
		border-radius: 8rpx;
		padding-left: 30rpx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #333333;
		margin-bottom: 30rpx;

		.address-detail {
			image {
				margin-right: 20rpx;
				width: 22rpx;
				height: 28rpx;
			}

		}

		.left {
			padding: 30rpx 0;
			box-sizing: border-box;

			.name {
				margin-top: 20rpx;
			}

			.green1 {
				margin-right: 30rpx;
			}
		}

		.right {
			width: 68rpx;
			height: 160rpx;
			background: #077840;
			padding: 40rpx 20rpx;
			box-sizing: border-box;
			color: #fff;
			border-radius: 0 8rpx 8rpx 0;

		}
	}

	.buyer-message {
		width: 690rpx;
		// height: 100rpx;
		margin: 0 auto;
		background: #FFFFFF;
		border-radius: 8rpx;
		line-height: 50rpx;
		// padding-left: 30rpx;
		// padding-right: 30rpx;
		padding: 30rpx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;

		.buyer {
			margin-right: 20rpx;
			height: 100%;
			display: inline-block;
			width: 288rpx;
			color: #666;
			font-size: 28rpx;
		}

		.message {
			display: inline-block;
			color: #333;
			font-size: 26rpx;

		}
	}

	.order-input {
		position: relative;
		width: 100%;
		padding-top: 30rpx;
		padding-left: 25rpx;
		padding-right: 25rpx;
		box-sizing: border-box;


		input {
			height: 72rpx;
			width: 100%;
			background-color: #F6F6F6;
			border-radius: 36px;
			padding-left: 224rpx;
			box-sizing: border-box;
			margin-bottom: 30rpx;

			&:placeholder {
				font-size: 28rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #BEBEBE;
				line-height: 72rpx;
				text-align: center;
			}

		}

		.search-icon {
			width: 29rpx;
			height: 31rpx;
			color: #BEBEBE;
			position: absolute;
			top: 52rpx;
			left: 210rpx;

			.uni-icons {
				font-size: 30rpx;
			}
		}

		.toptab {
			// height: 102rpx;
			// margin-left: 30rpx;
			overflow-x: scroll;
			white-space: nowrap;

			.item {
				height: 60rpx;
				font-size: 30rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
				// line-height: 60rpx;
				display: inline-block;
				margin-left: 30rpx;
				margin-right: 30rpx;

				// margin-top: 20rpx;
				&:first-child {
					margin-left: 10rpx;
				}
			}

			.active {
				font-weight: 500;
				color: #077840 !important;
			}

			.bottom-line {
				width: 60rpx;
				height: 4rpx;
				background: #077840;
				margin: 0 auto;
				margin-top: 16rpx;
			}
		}
	}

	.sta {
		height: 52rpx;
		background: #F3F8F6;
		border-radius: 8rpx;
		font-size: 22rpx;
		line-height: 52rpx;
		text-align: center;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #077840;
		// margin-bottom: 30rpx;
		padding: 0 10rpx;
		box-sizing: border-box;
	}

	.goods-sta {
		// width: 166rpx;
		display: inline-block;
	}

	.goods-sta1 {
		// width: 252rpx;
		display: inline-block;
	}

	.goods-sta2 {
		width: 212rpx;
		color: #999999;
		background-color: #EEEEEE;
	}

	.item-content {
		background-color: #F9F9F9;
		// display: none;
		// margin-bottom: 96rpx;

		.item {
			width: 690rpx;
			// height: 600rpx;
			margin: 0 auto;
			margin-top: 20rpx;
			background-color: #fff;
			padding-bottom: 30rpx;
			box-sizing: border-box;

			&:last-child {
				margin-bottom: 20rpx;
			}
		}

		.buyers {
			.buyers-bigBox {
				margin: 0 30rpx;

				.buyers-box {
					width: 100%;
					height: 99rpx;
					line-height: 99rpx;
					border-bottom: 2px solid #EEEEEE;
					display: flex;
					justify-content: space-between;

					.buyers-left {
						display: flex;
						justify-content: flex-start;

						.courier {
							width: 108rpx;
							height: 52rpx;
							border-radius: 8px;
							border: 2px solid #077840;
							margin-top: 20rpx;
							font-size: 22rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #077840;
							line-height: 52rpx;
							text-align: center;
						}

						.buyers-name {
							width: 36rpx;
							height: 36rpx;
							margin-right: 20rpx;
							margin-top: 34rpx;

							image {
								width: 100%;
								height: 100%;
							}
						}
					}

					.store-name {
						font-size: 26rpx;
						font-family: PingFangSC-Medium, PingFang SC;
						font-weight: 500;
						color: #333333;
					}

					.buyers-right {
						.buyers-mobile {
							font-size: 26rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #077840;
							margin-right: 20rpx;
						}

						.goods-status {
							font-size: 26rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #077840;
						}
					}

				}

				.goods-detail {
					// height: 350rpx;
					width: 100%;
					border-bottom: 2px solid #EEEEEE;
					margin-top: 28rpx;

					.goods-newly {
						margin-bottom: 28rpx;
						display: flex;
						justify-content: space-between;

						&_icon {
							width: 100rpx;
							height: 50rpx;
							font-size: 24rpx;
							font-family: PingFangSC-Medium, PingFang SC;
							font-weight: 500;
							color: #FFFFFF;
							line-height: 50rpx;
							background: linear-gradient(54deg, #FF7436 0%, #FF3333 100%);
							border-radius: 16rpx 0px 16rpx 0px;
							text-align: center;
						}

						/* 秒杀颜色 */
						&_color {
							background: linear-gradient(270deg, #FF904C 0%, #FF5F43 47%, #FF4B90 100%);
						}
					}

					.goods-top {
						display: flex;
						justify-content: flex-start;

						.goods-img {
							width: 180rpx;
							height: 180rpx;
							margin-right: 20rpx;

							image {
								width: 100%;
								height: 100%;
							}
						}

						.goods-detail-text {
							height: 180rpx;
							width: 430rpx;

							.goods {
								display: flex;
								justify-content: space-between;
								margin-bottom: 10rpx;
								font-size: 28rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #333333;
							}

							.goods-species {
								display: flex;
								justify-content: space-between;
								font-size: 24rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #999999;
							}
						}

						.seven-day {
							width: 164rpx;
							height: 54rpx;
							line-height: 54rpx;
							text-align: center;
							background: #EEEEEE;
							border-radius: 8rpx;
							margin-top: 20rpx;
							font-size: 24rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #999999;
						}
					}

					.packing {
						display: flex;
						justify-content: space-between;
						font-size: 26rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #999999;
						margin: 20rpx 0;
					}

					.week {
						font-size: 24rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #FF6269;
						margin-bottom: 20rpx;
					}

					.total-price {
						font-size: 26rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #999999;
						margin-bottom: 30rpx;

						.total {
							color: #333333;
							margin: 0px 8px;
						}
					}
				}

				.order-number {
					font-size: 26rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #999999;
					margin-top: 10rpx;

					.number {
						color: #333333;
					}
				}

				.order-time {
					font-size: 26rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #999999;
					margin-top: 20rpx;
					// margin-bottom: 30rpx;

					.time {
						color: #333333;
					}
				}


			}
		}
	}




	.gray {
		color: #999999 !important;
	}

	.common {
		display: flex;
		justify-content: flex-end;

		.six {
			width: 200rpx;
		}
	}


	.goods-right {
		display: flex;
		justify-content: flex-end;
	}

	.tuidan {
		height: 52rpx;
		background: #F3F8F6;
		border-radius: 8rpx;
		padding: 10rpx;
		box-sizing: border-box;
		margin-right: 20rpx;
	}

	.sta-sty {
		view {
			margin-bottom: 0;
			margin: 4rpx 0 !important;
		}

		.sta1 {
			margin-right: 312rpx !important;
		}

		.sta2 {
			margin-right: 226rpx !important;
		}

		.sta3 {
			margin-right: 268rpx !important;
		}
	}

	.void {
		display: none;
		width: 252rpx;
		height: 184rpx;
		margin-top: 30rpx;
		margin-left: 250rpx;
		margin-bottom: 30rpx;

		.img {
			width: 128rpx;
			height: 114rpx;
			margin-left: 62rpx;
			margin-bottom: 30rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.text {
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
		}
	}

	.tuikuan-btn {
		width: 630rpx;
		height: 60rpx;
		margin: 0 auto;
		background: #EEEEEE;
		border-radius: 8px;
		line-height: 60rpx;
		text-align: center;
		margin-top: 30rpx;
		font-size: 26rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #999999;
	}

	.green {
		background-color: #077840;
		color: #fff;
	}

	.user-agreement {
		font-size: 24rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #999999;
		margin-left: 30rpx;
		margin-bottom: 30rpx;

		.green2 {
			color: #077840;
		}
	}

	.order-btn {
		// display: none;
		position: fixed;
		bottom: 0;
		left: 0;
		font-size: 26rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		display: flex;
		justify-content: flex-end;
		width: 100%;
		// height: 96rpx;
		background-color: #fff;
		padding-right: 30rpx;
		padding-left: 30rpx;
		box-sizing: border-box;
		box-shadow: 0px -6px 8px 0px rgba(218, 218, 218, 0.5), 0px 0px 0px 0px #E5E5E5, 0px -2px 0px 0px #EEEEEE;

		.btn {
			// margin-top: 30rpx;
			// height:76rpx;
			line-height: 60rpx;
			text-align: center;
			box-shadow: 0px -6rpx 8rpx 0rpx rgba(218, 218, 218, 0.5);
			border-radius: 16rpx;
			margin: 10rpx 0;
			margin-left: 10rpx;
		}

		.two {
			//  padding: 20rpx 50rpx;
			// box-sizing: border-box;
			width: 148rpx;
		}

		.refund-btn {
			border: 2rpx solid #CECECE;
			color: #666666;
		}

		.confirm-btn {
			border: 2rpx solid #077840;
			color: #077840;
		}

	}

	.bounced {
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, .75);
		position: fixed;
		top: 0;
		left: 0;
		z-index: 9999;

		.bounced-box {
			width: 560rpx;
			height: 286rpx;
			background: #FFFFFF;
			border-radius: 16rpx;
			position: absolute;
			top: 40%;
			left: 12%;
		}

		.title {
			height: 188rpx;
			border-radius: 16rpx;
			border: 1rpx solid #E5E5E5;
			box-sizing: border-box;
			line-height: 188rpx;
			text-align: center;
			font-size: 36rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #333333;
		}

		.two-row {
			height: 188rpx;
			border-radius: 16rpx;
			border: 1rpx solid #E5E5E5;
			box-sizing: border-box;
			text-align: center;
			font-size: 36rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #333333;

			.title1 {
				margin-top: 40rpx;
				margin-bottom: 16rpx;
			}

			.content {
				font-size: 30rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
			}
		}

		.btn {
			height: 96rpx;
			line-height: 96rpx;
			font-size: 36rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			display: flex;
			color: #333333;

			.cancel,
			.confirm {
				width: 50%;
				text-align: center;
			}

			.cancel {
				border-right: 1rpx solid #E5E5E5;
			}

			.confirm {
				color: #077840;
			}
		}

	}

	/deep/.w-picker-header uni-text:last-child {
		color: #077840 !important;
	}

	.time1 {
		font-size: 24rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #FF6269;
		margin-bottom: 20rpx;
	}

	.quanbu {
		width: 180rpx !important;
		background-color: #EEEEEE !important;
		color: #999999 !important;
		border: 0 !important;
	}

	.fott-btn {
		display: flex;
		gap: 20px;

		.close {
			flex: 1;
			text-align: center;
			color: red;
			padding: 10px 5px;
		}

		.confirm {
			flex: 1;
			color: #077840;
			text-align: center;
			padding: 10px 5px;
		}

	}

	.mobile {
		padding: 20rpx 0;
		box-sizing: border-box;

		margin: 0 auto;
		border-bottom: 2px solid #EEEEEE;

		span {
			font-size: 14px;
			background: #4ba170;
			color: #fff;
			padding: 5px;
			display: block;
			text-align: center;
			margin: 5px;
		}

		.filetext {
			color: #4ba170;
			padding-left: 10px;
			font-size: 12px;
		}

		.mobile-text {
			margin-bottom: 0rpx;
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #333333;
		}

		.mobile-input input:placeholder {
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
		}
	}

	.chooseImage {}
</style>